package com.xianggu.designMode.chainMethod.demo04.impl;

import com.xianggu.designMode.chainMethod.demo03.Order;
import com.xianggu.designMode.chainMethod.demo04.HandlerFailureListener;

// 邮件通知器：发送邮件通知管理员
public class EmailNotificationListener implements HandlerFailureListener {
    @Override
    public void onFailure(Order order, String failedStep) {
        System.out.printf("[邮件] 订单 %s 在环节 %s 处理失败，已通知管理员。%n", 
            order.getOrderId(), failedStep);
    }
}